package com.hulu73.struts1.newCore;

/**
 * 在struts-config.xml配置文件中，每个<action>元素都对应着一个ActionMapping
 * @author lzg
 *
 * 2017年9月11日
 */
public class ActionMapping {
	
	//访问路径
	private String path = "";
	//类型
	private String type = "";
	
	private ActionForm actionForm;
	
	private ActionForward actionForward;
	
	
	
	public ActionForm getActionForm() {
		return actionForm;
	}
	public void setActionForm(ActionForm actionForm) {
		this.actionForm = actionForm;
	}
	public ActionForward getActionForward() {
		return actionForward;
	}
	public void setActionForward(ActionForward actionForward) {
		this.actionForward = actionForward;
	}
	public String getPath() {
		return path;
	}
	public void setPath(String path) {
		this.path = path;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public ActionMapping(String path, String type) {
		super();
		this.path = path;
		this.type = type;
	}
	public ActionForward findForward(String name) {
		ActionForward actionForward = this.getActionForward();
		String path= actionForward.getProperties().getProperty(name);
		return new ActionForward(name, path);
	}
	
	

}
